<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="taglib.jsp" %>
<!-- **********************************************************************************************************************************************************
MAIN SIDEBAR MENU
*********************************************************************************************************************************************************** -->
<!--sidebar start-->
<aside>
    <div id="sidebar" class="nav-collapse">
        <!-- sidebar menu start-->
        <ul class="sidebar-menu" id="nav-accordion">
            <p class="centered">
                <%--<a href="profile.html"><img src="${ctx}/assets/img/ui-sam.jpg" class="img-circle" width="60"></a>--%>
                <img src="${ctx}/assets/img/ui-sam.jpg" class="img-circle" width="60">
            </p>
            <h5 class="centered">
                ${loginUser.realName}
            </h5>
            <h6 class="centered" style="color: green">
                (${roleDetail})
            </h6>
            <!-- 目前支持三层菜单遍历，后续如果需要四层或更多层可以修改 -->
            <c:forEach items="${sysMenus}" var="sysMenu0">
                <c:if test="${sysMenu0.state.checked == true}">
                    <div id="menu_div_${sysMenu0.id}" class="menu_div" style="display: none">
                        <c:forEach items="${sysMenu0.nodes}" var="sysMenu1">
                            <c:if test="${sysMenu1.state.checked == true}">
                                <li class="sub-menu">
                                    <a href="javascript:<c:if test='${not empty sysMenu1.path}'>jumpMenu('<c:choose><c:when test='${not empty sysMenu1.domain}' >${sysMenu1.domain}</c:when><c:otherwise>${ctx}</c:otherwise></c:choose>${sysMenu1.path}')</c:if>;">
                                        <i class="${sysMenu1.icon}"></i>
                                        <span>${sysMenu1.menuName}</span>
                                    </a>
                                    <c:if test="${not empty sysMenu1.nodes}">
                                        <ul class="sub">
                                            <c:forEach items="${sysMenu1.nodes}" var="sysMenu2">
                                                <c:if test="${sysMenu2.state.checked == true}">
                                                    <li>
                                                        <a href="javascript:<c:if test='${not empty sysMenu2.path}'>jumpMenu('<c:choose><c:when test='${not empty sysMenu2.domain}' >${sysMenu2.domain}</c:when><c:otherwise>${ctx}</c:otherwise></c:choose>${sysMenu2.path}')</c:if>;">
                                                            <i class="${sysMenu2.icon}"></i>
                                                            <span>${sysMenu2.menuName}</span>
                                                        </a>
                                                    </li>
                                                </c:if>
                                            </c:forEach>
                                        </ul>
                                    </c:if>
                                </li>
                            </c:if>
                        </c:forEach>
                    </div>
                </c:if>
            </c:forEach>
        </ul>
        <!-- sidebar menu end-->
    </div>
</aside>
<!--sidebar end-->